<?
if(!$pdiff) $pdiff=1;
$list=get_detailed_payments($reseller_id,$pdiff);
$check= get_check_detailed($reseller_id);
?>
<table>
<tr valign=top><td>


<table class="bTable" cellspacing=0>
	<tr>
		<th>Reseller</th>
		 <th> Client </th>
		 <th> Link Type </th>
		 <th> Sale type   </th>
		 <th> State  </th>
		 <th> Date</th>
		 <th> Price  </th>
		 <th> Real price </th>
		 <th> Commissions</th>
	</tr>
<?
	echo $list[0];
?>
</table>

<table class="bTable" cellspacing=0>
<tr><th>check info:</th></tr>
<?echo $check?>
</table>

</td><td rowspan=2>

<table class="bTable" cellspacing=0>
<tr>

</tr>
<?
echo $list[1];
?>
</table>


</td></tr>
<tr>
	<td align=center>
	<form action="<? $params[sid]=$sid;
			$params[reseller_id]=$reseller_id;
			$params[action]="approve_payment";
			echo "$baseURL/admin/payments/?".encode_params($params);?>" method='POST' >
		<table class="bTable" cellspacing=0>
			<tr><th colspan=10>Approve</th></tr>
			<tr><td>Comment:</td><td><textarea name=comment cols=40 rows=10></textarea></td></tr>
			<tr><td>Payment Method</td><td><select name='payment_method'>
						<?=$list[3]?>
					</select></td></tr>
			<tr><td colspan=10 align=center><input type=submit value="Approve">&nbsp;<input type=button value='Close' onClick="window.close()"></td></tr>

		</table>
		<?
		echo $list[2];
		?>
	</form>
	</td>
</tr>
</table>

